# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

target 'PHPocketPro' do
  # Comment the next line if you don't want to use dynamic frameworks
  use_frameworks!

  # Pods for PHPocketPro
  # 消除所有警告
  inhibit_all_warnings!
  
  pod 'FirebaseAnalytics'
  pod 'FirebaseCrashlytics'
  pod 'YYText', '~> 1.0.7'
  pod 'Masonry', '~> 1.1.0'
  pod 'GKCover', '~> 3.0.1'
  pod 'YYModel', '~> 1.0.4'
  pod 'YYWebImage', '~> 1.0.5'
  pod 'FSPagerView', '~> 0.8.3'
  pod 'AFNetworking', '~> 4.0.1'
  pod 'MBProgressHUD', '~> 1.2.0'
  pod 'MBProgressHUD', '~> 1.2.0'
  pod 'AliyunOSSiOS', '~> 2.10.18'
  pod 'DYFCryptoUtils', '~> 1.0.2'
  pod 'UICKeyChainStore', '~> 2.2.1'
  pod 'IQKeyboardManager', '~> 6.5.12'
  
  # 活体检测
  pod 'AAINetwork', :http => 'https://prod-guardian-cv.oss-ap-southeast-5.aliyuncs.com/sdk/iOS-libraries/AAINetwork/AAINetwork-V1.0.1.tar.bz2', type: :tbz
  pod 'AAILiveness', :http => 'https://prod-guardian-cv.oss-ap-southeast-5.aliyuncs.com/sdk/iOS-liveness-detection/3.0.3/iOS-Liveness-SDK-V3.0.3.tar.bz2', type: :tbz
  
  # 调试相关
  pod 'LookinServer', :configurations => ['Debug']
  # pod 'atlantis-proxyman', :configurations => ['Debug']

end

post_install do |installer|
  installer.generated_projects.each do |project|
    project.targets.each do |target|
      target.build_configurations.each do |config|
        config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'
      end
    end
    # xcode15报错修复
    installer.aggregate_targets.each do |target|
      target.xcconfigs.each do |variant, xcconfig|
        xcconfig_path = target.client_root + target.xcconfig_relative_path(variant)
        IO.write(xcconfig_path, IO.read(xcconfig_path).gsub("DT_TOOLCHAIN_DIR", "TOOLCHAIN_DIR"))
      end
    end
    installer.pods_project.targets.each do |target|
      target.build_configurations.each do |config|
        if config.base_configuration_reference.is_a? Xcodeproj::Project::Object::PBXFileReference
          xcconfig_path = config.base_configuration_reference.real_path
          IO.write(xcconfig_path, IO.read(xcconfig_path).gsub("DT_TOOLCHAIN_DIR", "TOOLCHAIN_DIR"))
        end
      end
    end
  end
end
